<template>
  <div class="demo">使用pinia传参:{{ userStore.token }}</div>
  <el-button type="primary" @click="handler">修改pinia值</el-button>
</template>

<script setup lang="ts">
import useUserStore from '../../store/modules/user'

const userStore = useUserStore()

const handler = () => {
  userStore.setToken('Hello WPF')
}
</script>

<style scoped>
.demo {
  width: 300px;
  height: 300px;
  background-color: lightskyblue;
}
</style>
